home *** CD-ROM | disk | FTP | other *** search
- askto -- "ask" utility with timeout
-
- Written by David Dyer-Bennet, and released 22-March-87 to the public
- domain. Anybody may use this for anything.
-
- This utility is useful for writing batch files that query the user
- and behave differently depending on the answers received. This
- version has the special capability that it can wait a limited amount
- of time for an answer, and if none is received, proceed with a
- default action.
-
- Usage:
- askto [-dseconds] [-adefaultanswer] prompt string to present
-
- If -d is not specified, 300 seconds (5 minutes) is allowed. If -d0
- is specified, askto waits forever for a response.
-
- if -a is not specified, the default answer is no.
-
- A question mark is added to the end of the prompt string if none is
- present. If any of the pieces of the prompt string are enclosed
- inquotes (as they might need to be if they contained characters
- special to DOS), those quotes are removed.
-
- If the answer determined is yes, askto exits with a status of zero.
- If the answer determined is no, askto exits with a status of one.
- Askto may exit with a status of two if the command line is invalid.
-
- Test.bat is an example of a very simple use of askto.
-